package com.jy.adscm.operation.cg.bean;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * bom与供应商
 * </p>
 *
 * @author zyl
 * @since 2019-07-07
 */
public class CgBomSupplier implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * bomId
     */
    private Long bid;
    @TableField(exist = false)
    private CgBom bomName ;
    /**
     * 供应商id
     */
    private Long sid;
    @TableField(exist = false)
    private String supplierName;
    /**
     * 最小采购量
     */
    private Integer minPurchase;
    /**
     * 采购提前期
     */
    private Integer predate;
    /**
     * 发票类型
     */
    @TableField("makeInvoice_type")
    private String makeinvoiceType;
    /**
     * 支付方式
     */
    private String paymentMethod;
    /**
     * 运输方式
     */
    private String transportMethod;
    /**
     * 期初数
     */
    private String startNums;
    /**
     * 单价
     */
    private Float price;
    /**
     * 创建人
     */
    private String creator;
    @TableField(exist = false)
    private String creatorName;
    /**
     * 创建时间
     */
    private Date createTime;
    /*
    采购类型（1月采购，2年采购）
    * */
    private  Integer type;

    @TableField(exist = false)
    private String typeName;



    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public CgBom getBomName() {
        return bomName;
    }

    public void setBomName(CgBom bomName) {
        this.bomName = bomName;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getBid() {
        return bid;
    }

    public void setBid(Long bid) {
        this.bid = bid;
    }

    public Long getSid() {
        return sid;
    }

    public void setSid(Long sid) {
        this.sid = sid;
    }

    public Integer getMinPurchase() {
        return minPurchase;
    }

    public void setMinPurchase(Integer minPurchase) {
        this.minPurchase = minPurchase;
    }

    public Integer getPredate() {
        return predate;
    }

    public void setPredate(Integer predate) {
        this.predate = predate;
    }

    public String getMakeinvoiceType() {
        return makeinvoiceType;
    }

    public void setMakeinvoiceType(String makeinvoiceType) {
        this.makeinvoiceType = makeinvoiceType;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public String getTransportMethod() {
        return transportMethod;
    }

    public void setTransportMethod(String transportMethod) {
        this.transportMethod = transportMethod;
    }

    public String getStartNums() {
        return startNums;
    }

    public void setStartNums(String startNums) {
        this.startNums = startNums;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getCreateTime() {
        return createTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "CgBomSupplier{" +
        "id=" + id +
        ", bid=" + bid +
        ", sid=" + sid +
        ", minPurchase=" + minPurchase +
        ", predate=" + predate +
        ", makeinvoiceType=" + makeinvoiceType +
        ", paymentMethod=" + paymentMethod +
        ", transportMethod=" + transportMethod +
        ", startNums=" + startNums +
        ", price=" + price +
        ", creator=" + creator +
        ", createTime=" + createTime +
        "}";
    }
}
